// Copyright 2012 Square, Inc.

package com.squareup.timessquare.bean;

import java.util.Date;

import com.squareup.timessquare.MonthView;

/** Describes the state of a particular date cell in a {@link MonthView}. */
public class MonthCellDescriptor {
	public enum RangeState {
		NONE, FIRST, MIDDLE, LAST
	}

	private final Date date;
	private final int value;
	private final boolean isCurrentMonth;
	private boolean isSelected;
	private final boolean isToday;
	private final boolean isSelectable;
	private boolean isHighlighted;
	private RangeState rangeState;
	
	private boolean isSigned;

	private int dayState;// 0:green;1:yellow;2:red

	// MonthCellDescriptor(Date date, boolean currentMonth, boolean selectable,
	// boolean selected,
	// boolean today, boolean highlighted, int value, RangeState rangeState) {
	// this.date = date;
	// isCurrentMonth = currentMonth;
	// isSelectable = selectable;
	// isHighlighted = highlighted;
	// isSelected = selected;
	// isToday = today;
	// this.value = value;
	// this.rangeState = rangeState;
	// }

	public MonthCellDescriptor(Date date, boolean currentMonth, boolean selectable, boolean selected, boolean today, boolean highlighted, int value, RangeState rangeState, int daySate, boolean isSigned) {
		this.date = date;
		isCurrentMonth = currentMonth;
		isSelectable = selectable;
		isHighlighted = highlighted;
		isSelected = selected;
		isToday = today;
		this.value = value;
		this.rangeState = rangeState;
		this.dayState = daySate;
		this.isSigned = isSigned;
	}

	public Date getDate() {
		return date;
	}

	public boolean isCurrentMonth() {
		return isCurrentMonth;
	}

	public boolean isSelectable() {
		return isSelectable;
	}

	public boolean isSelected() {
		return isSelected;
	}

	public void setSelected(boolean selected) {
		isSelected = selected;
	}

	public boolean isHighlighted() {
		return isHighlighted;
	}

	public void setHighlighted(boolean highlighted) {
		isHighlighted = highlighted;
	}

	public boolean isToday() {
		return isToday;
	}

	public RangeState getRangeState() {
		return rangeState;
	}

	public void setRangeState(RangeState rangeState) {
		this.rangeState = rangeState;
	}

	public int getValue() {
		return value;
	}

	public int getDayState() {
		return dayState;
	}

	public void setDayState(int dayState) {
		this.dayState = dayState;
	}

	@Override
	public String toString() {
		return "MonthCellDescriptor{" + "date=" + date + ", value=" + value + ", isCurrentMonth=" + isCurrentMonth + ", isSelected=" + isSelected + ", isToday=" + isToday + ", isSelectable=" + isSelectable + ", isHighlighted=" + isHighlighted + ", rangeState=" + rangeState + ", dayState=" + dayState + '}';
	}

	public boolean isSigned() {
		return isSigned;
	}

	public void setSigned(boolean isSigned) {
		this.isSigned = isSigned;
	}
	
	
}
